

package cn.shengchao.examstar.comment.domain.valobj;

import cn.hutool.core.util.StrUtil;
import lombok.Data;

@Data
public class Content {
    private String value;

    public Content(String value) {
        if (StrUtil.isEmpty(value))
            throw new IllegalArgumentException("评论内容不能为空");
        if (value.length() > 200)
            throw new IllegalArgumentException("评论内容不能超过200字");
        this.value = value;
    }
}
